import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../layout/Home.vue'

Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    redirect:"/magnify",
    children : [
      {
        path: 'magnify',
        name: 'Magnify',
        component: () => import('../components/Magnify.vue')
      },
      {
        path: 'toast',
        name: 'Toast',
        component: () => import('../views/Toast.vue')
      },
      {
        path: 'collapse',
        name: 'Collapse',
        component: () => import('../views/Collapse.vue')
      },
    ]
  }
];

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
});

export default router
